package com.longchat.domain.award;

import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name="award")
public class Award {
	
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	private Integer id;
	@Column(name="level")
	private Integer level;
	@Column(name="rate")
	private double rate;
	@Column(name="name")
	private String name;
	@Column(name="count",nullable=true)
	private Integer count;
	@Column(name="min_angle")
	private Integer minAngle;
	@Column(name="max_angle")
	private Integer maxAngle;
	@Column(name="remain")
	private Integer remain;
	@Column(name="description")
	private String description;
	@Column(name="has_prize")
	private Boolean hasPrize;
	@ManyToOne(cascade={CascadeType.ALL})
	@JoinColumn(name="activity_id")
	private Activity activity;
	@OneToMany(cascade=CascadeType.ALL,mappedBy="award")
	private Set<AwardLog> awardlogs;
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public Integer getLevel() {
		return level;
	}
	public void setLevel(Integer level) {
		this.level = level;
	}
	public double getRate() {
		return rate;
	}
	public void setRate(double rate) {
		this.rate = rate;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Integer getCount() {
		return count;
	}
	public void setCount(Integer count) {
		this.count = count;
	}
	public Integer getMinAngle() {
		return minAngle;
	}
	public void setMinAngle(Integer minAngle) {
		this.minAngle = minAngle;
	}
	public Integer getMaxAngle() {
		return maxAngle;
	}
	public void setMaxAngle(Integer maxAngle) {
		this.maxAngle = maxAngle;
	}
	public Integer getRemain() {
		return remain;
	}
	public void setRemain(Integer remain) {
		this.remain = remain;
	}
	public Set<AwardLog> getAwardlogs() {
		return awardlogs;
	}
	public void setAwardlogs(Set<AwardLog> awardlogs) {
		this.awardlogs = awardlogs;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public Boolean getHasPrize() {
		return hasPrize;
	}
	public void setHasPrize(Boolean hasPrize) {
		this.hasPrize = hasPrize;
	}
	
	
}
